@echo off
echo ==========================================
echo     Fixing Maven Dependencies
echo ==========================================
echo.

echo 1. Checking if Maven is installed...
where mvn >nul 2>&1
if %errorlevel% neq 0 (
    echo Maven is not found in PATH.
    echo Please install Maven or use an IDE to build the project.
    echo.
    echo Alternative: Use IntelliJ IDEA or Eclipse to import and run the project.
    echo Main class: com.example.web.WebApplication
    echo.
    goto :end
)

echo Maven found! Proceeding with build...
echo.

echo 2. Cleaning previous build...
call mvn clean

echo.
echo 3. Compiling with force update...
call mvn compile -U

echo.
echo 4. Running Spring Boot application...
call mvn spring-boot:run

:end
echo.
echo Press any key to exit...
pause